package com.itheima.HomeWork.Demo01;

public interface ShowHandler {
    void show();
}

class ShowHandlerDemo{

    public void useShowHandler(){
//        new ShowHandler(){
//            @Override
//            public void show() {
//                System.out.println("我是测试类中的show");
//            }
//        }.show();
        ShowHandler show2 = () -> System.out.println("我是测试类中的show1");
        ((ShowHandler)() -> System.out.println("我是测试类中的show2")).show();
    }


}

class LambadaTest1{
    public static void main(String[] args) {
        new ShowHandlerDemo().useShowHandler();
    }
}